{% if site.disqus_username %}
<!-- disqus 评论框 start -->
<div class="comment">
	<div id="disqus_thread" class="disqus-thread"></div>
</div>
<!-- disqus 评论框 end -->
<!-- disqus 公共JS代码 -->
<script type="text/javascript">
	/* * * CONFIGURATION VARIABLES * * */
	var disqus_shortname = "{{site.disqus_username}}";
	var disqus_identifier = "{{page.id}}";
	var disqus_url = "{{site.url}}{{page.url}}";

	(function() {
		var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
		dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	})();
</script>
<!-- disqus 公共JS代码 end -->
{% endif %}

<!--Gitalk评论start  -->
{% if site.gitalk %}
  <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
  <script src="https://unpkg.com/gitalk@latest/dist/gitalk.min.js"></script>
  <div id="gitalk-container"></div>
  <!-- 引入一个生成md5的js，用于对id值进行处理，防止其过长 -->
  <!-- Thank DF:https://github.com/NSDingFan/NSDingFan.github.io/issues/3#issuecomment-407496538 -->
  <script src="{{ site.baseurl }}/js/md5.min.js"></script>
  <script type="text/javascript">
	var gitalk = new Gitalk({
	clientID: '{{site.gitalk.clientID}}',
	clientSecret: '{{site.gitalk.clientSecret}}',
	repo: '{{site.gitalk.repo}}',
	owner: '{{site.gitalk.owner}}',
	admin: ['{{site.gitalk.admin}}'],
	distractionFreeMode: {{site.gitalk.distractionFreeMode}},
	id: md5(location.pathname),
	});
	gitalk.render('gitalk-container');
  </script>
{% endif %}
<!-- Gitalk end -->

{% if site.livere_uid %}
<!-- 来必力City版安装代码 -->
<div id="lv-container" data-id="city" data-uid={{site.livere_uid}}>
	<script type="text/javascript">
   (function(d, s) {
	   var j, e = d.getElementsByTagName(s)[0];

	   if (typeof LivereTower === 'function') { return; }

	   j = d.createElement(s);
	   j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
	   j.async = true;

	   e.parentNode.insertBefore(j, e);
   })(document, 'script');
	</script>
<noscript> 为正常使用livere评论功能请激活JavaScript</noscript>
</div>
<!-- City版安装代码完 -->
{% endif %}
